Skip to content

Conversation

@gkrajniak
Copy link
Collaborator

@gkrajniak gkrajniak commented Sep 19, 2025

Summary by CodeRabbit

  • Bug Fixes

    • Use the platform mesh account ID for account identification and tenant routing, improving accuracy and reducing misrouting when account data is absent.
    • Portal context values now reliably reflect the correct account, improving consistency for account-dependent features.
  • Chores

    • Aligned context handling with platform conventions for more robust URL resolution and routing.
  • Tests

    • Added tests to validate fallback behavior and the updated context-driven routing.

@gkrajniak gkrajniak requested a review from nexus49 September 19, 2025 10:06
@coderabbitai
Copy link

coderabbitai bot commented Sep 19, 2025

Walkthrough

Replaced uses of context.account with context['core_platform-mesh_io_account'] in two services; renamed a method parameter to _token. Updated CRD gateway URL construction to insert the platformMesh account segment. Added a unit test and import validating behavior when isSubDomain is false.

Changes

Cohort / File(s) Summary of changes
Account context provider
src/portal-options/account-entity-context-provider.service.ts
Method parameter renamed from token to _token. getContextValues now reads id from context['core_platform-mesh_io_account'] instead of context.account; other returned fields unchanged.
Content configuration service providers
src/portal-options/service-providers/content-configuration-service-providers.service.ts
Replaced context.account usage with context['core_platform-mesh_io_account']. When present, platformMeshAccountId is injected into the CRD gateway URL by replacing /graphql with :${platformMeshAccountId}/graphql.
Tests
src/portal-options/service-providers/content-configuration-service-providers.service.spec.ts
Added import of welcomeNodeConfig and a test asserting getServiceProviders returns welcomeNodeConfig when context.isSubDomain is false.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes


📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Free

📥 Commits

Reviewing files that changed from the base of the PR and between 3055872 and 2fd2487.

📒 Files selected for processing (1)
  • src/portal-options/service-providers/content-configuration-service-providers.service.spec.ts (2 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • src/portal-options/service-providers/content-configuration-service-providers.service.spec.ts

Note

🎁 Summarized by CodeRabbit Free

Your organization is on the Free plan. CodeRabbit will generate a high-level summary and a walkthrough for each pull request. For a comprehensive line-by-line review, please upgrade your subscription to CodeRabbit Pro by visiting https://app.coderabbit.ai/login.

Comment @coderabbitai help to get the list of available commands and usage tips.

@gkrajniak gkrajniak self-assigned this Sep 19, 2025
@gkrajniak gkrajniak added the bug Something isn't working label Sep 19, 2025
@nexus49 nexus49 merged commit 4c36092 into main Sep 19, 2025
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants